package xiaohao.order.top;

import org.apache.log4j.Logger;
import org.springframework.dao.support.DaoSupport;

import com.taobao.api.TaobaoClient;

public abstract class TopDaoSupport extends DaoSupport {
	
	protected final Logger log = Logger.getLogger(getClass());

	private TaobaoClient taobaoClient;

	public TaobaoClient getTaobaoClient() {
		return taobaoClient;
	}

	public void setTaobaoClient(TaobaoClient taobaoClient) {
		this.taobaoClient = taobaoClient;
	}

	@Override
	protected void checkDaoConfig() throws IllegalArgumentException {
		if (this.taobaoClient == null) {
			throw new IllegalArgumentException("taobao client is required!");
		}
	}
}
